home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / os2 / edm0407s.zip / STAT3SRC.ZIP / EDITFILE.HPP < prev    next >
C/C++ Source or Header  |  1996-06-27  |  1KB  |  32 lines

  1. #ifndef _EDITFILE_HPP_
  2. #define _EDITFILE_HPP_
  3.  
  4. #define INCL_WINMESSAGEMGR
  5. #define INCL_DOSFILEMGR
  6. #define INCL_DOSERRORS
  7. #include <os2.h>
  8.  
  9. #include "afile.hpp"
  10.  
  11. class AEditFile : public AFile
  12.  
  13. {
  14.   public:
  15.     AEditFile (void);                                               // constructor
  16.     ~AEditFile (void);                                              // destructor
  17.     Boolean allocateDataBuffer (void);                              // allocate the data buffer
  18.     char * getPointerToData (void) { return (m_pFileContents); };   // returns the pointer to the data buffer
  19.     APIRET read (HWND hwndStatusLine);                              // read the data
  20.     APIRET write (HWND hwndStatusLine);                             // write the data
  21.     void stopProcess (void) { m_bStopProcess = true; };             // stop the process (reading / writing)
  22.  
  23.     enum { eBytesToRead = 102400 };                                 // default number of bytes to read / write
  24.  
  25.   private:
  26.     char * m_pFileContents;                                         // pointer to data buffer
  27.     ULONG m_ulFileSize;                                             // the size of the file
  28.     Boolean m_bStopProcess;                                         // stops the process if true
  29. };
  30.  
  31. #endif //_EDITFILE_HPP_
  32.